<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%	
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
	%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=basePath %>web/css/style.css" rel="stylesheet" type="text/css"/>
<link href="<%=basePath %>web/css/index.css" rel="stylesheet" type="text/css"/>
<script src="<%=basePath %>web/js/jQuery.js" type="text/javascript"></script>
<script src="<%=basePath %>web/js/format.js" type="text/javascript"></script>
<script type="text/javascript">
var contextPath = "<%=basePath%>";
var typelist;
	function goToPage(pageNo,restype) {
		$.ajax({
					url : contextPath + "resource/list",
					data : {
						pagesize : 6,
						pageno : pageNo,
						restype : restype
						
					},
					async:false,
					type : 'POST',
					success : function(list) {
							$("#nd_news_box").empty();
							if (list != null && list.totalRecord > 0) {
								var obj = list.records;
								for (var i = 0; i < obj.length; i++) {
									var content = '<div class="cont"> '
									+'<div class="left">'
									+'<p class="p1">'+new Date(obj[i].publishtime).getFullYear()+'年</p>'
									  +'<p class="p2">'+(new Date(obj[i].publishtime).getMonth()+1)+'月'+new Date(obj[i].publishtime).getDate()+'日</p>'
									  +'</div>'
									  +'<div class="right">'
									  +'<div class="center">'
									  +'<p class="p1"><a href="'+contextPath+'web/newsinfo.jsp?resid='+obj[i].resid+'">'+obj[i].resname+'</a></p>'
									  +'<p class="p2">'+(obj[i].describe==null?"":obj[i].describe)+'</p>'
									  +'</div>'
									  +'</div>'
									  +'</div>';
									$("#nd_news_box").append(content);
								}
							}
						
						pageList(list,restype);
					}

				});
		var nd_cont_right_width = $('.nd_cont_box').width() - $('.nd_cont_box .left').width()-3;
		$('.nd_cont_box .right').css('width',nd_cont_right_width+'px');
		$('#nd_news_box .cont').last().css('border-bottom','1px solid #dedede');
		$('#nd_download_box .cont').last().css('border-bottom','1px solid #dedede');
	}

	$(function() {
		$.ajax({
		url:contextPath+"restype/list",
		type:"post",
		async:false,
		success:function(data){
			typelist = data;
			$(".title_ul").empty();
			for (var i = 0; i < data.length; i++) {
				if(data[i].typeId == 4 || data[i].typeId >=100){
					continue;
				}
				var content= '<li id="Resouce'+data[i].typeId+'" class="title_li" onclick="changetab('+data[i].typeId+');">'+data[i].typeName+'</li>';
				$(".title_ul").append(content);
			}
		changetab(data[0].typeId);
		}
		});
		
	});
	
	function changetab(restype){
		for (var i = 0; i < typelist.length; i++) {
			if(restype==typelist[i].typeId){
				$("#Resouce"+restype).attr("class","title_li_cur");
				continue;
			}
			$("#Resouce"+typelist[i].typeId).attr("class","title_li");
		}
		goToPage(1, restype);
	}
</script>
<title>最新消息-资料下载</title>
</head>
<body>
<!-- 头部区域_begin -->
<div class="container">
	<div class="header">
		<p class="pwysj_p">配网云数据</p>
		<ul>
			<li class="li_cur"><a href="<%=basePath %>web/home.jsp" class="cur">首页</a></li>
			<li><a href="<%=basePath%>web/jjfa.jsp">解决方案</a></li>
			<li><a href="<%=basePath %>web/download.jsp">下载</a></li>
			<li><a href="<%=basePath %>web/experience.jsp">体验</a></li>
			<li><a href="<%=basePath %>web/about.jsp">关于</a></li>
		</ul>
		<div class="right">
			<a href="<%=basePath %>user/login.jsp" class="login">登 录</a>
			<a href="<%=basePath %>user/register.jsp" class="regist">注 册</a>
		</div>
	</div>
</div>
<!-- 头部区域_end -->

<!-- 主体区域_begin -->
<img src="images/news_down.jpg" style="width:100%;" alt="" />
<div class="container news_load_box">
	<!-- 标题_begin -->
	<h2 class="title_h2">
		<ul class="title_ul">
			<li id="ndNewMessage" class="title_li_cur" onclick="goToPage(1, 1);">最新消息</li>
			<li id="ndResouce" class="title_li" onclick="goToPage(1, 2);">资料下载</li>
			<div class="clear"></div>
		</ul>
	</h2>
	<!-- 标题_end -->

	<!-- 内容_begin -->
	<div class="nd_cont_box">
		<!-- 最新消息_begin -->
		<div id="nd_news_box">
		
			<div class="cont">
			<div class="left">
				<p class="p1">2014年</p>
				<p class="p2">8月24日</p>
			</div>
			<div class="right">
				<div class="center">
					<p class="p1"><a >组图：校服美女公交做作业走红 盘点校服美女哪家强？</a></p>
					<p class="p2">11月5日，长沙姑娘@sssdaisy下班坐上702路公交车。不久，一个身穿雅礼校服的女孩从雅礼中学车站上了车，“她上车后径直走到了后车厢台阶坐下，开始做英语作业。”公交车走走停停很是摇晃，可女孩似乎完全不受干扰，“她专注做作业的样子就显得格外特别。”</p>
				</div>
			</div>
		</div>

		</div>
		<!-- 最新消息_end -->

		<!-- 资料下载_begin -->
		<div id="nd_download_box" style="display:none;">
			<div class="cont">
			<div class="left">
				<p class="p1">2015年</p>
				<p class="p2">11月13日</p>
			</div>
			<div class="right">
				<div class="center">
					<p class="p1"><a >太平洋下载中心：Adobe Flash Player 15.0.0.223 官方版</a></p>
					<p class="p2">Adobe Flash Player(Flash插件)是Adobe发布的浏览器Flash支持补丁。随着网络速度与品质的提升，越来越多的网站开始使用Flash来表达网站的内容，以Flash强大的动画与向量画效果来弥补一般动画与HTML指令的不足。</p>
				</div>
			</div>
		</div>

		
		</div>
		<!-- 资料下载_end -->
	</div>
	<!-- 内容_end -->

	
</div>
<!-- 分页_begin -->
	    <div class="page">
           <a href="#">首页</a>
           <a href="#">上一页</a>
           <a class="intro" href="#">1</a>
           <a href="#">下一页</a>
           <a href="#">末页</a>
        </div>
	<!-- 分页_end -->
<!-- 主体区域_end -->


<!-- 底部区域_begin -->
<%@ include file="/web/foot.jsp"%>
<!-- 底部区域_end -->
<script src="<%=basePath %>web/js/show_common.js" type="text/javascript"></script>
</body>
</html>
